﻿#include "stdafx.h"
#include "Camera.h"

_NAMESPACE_BEGIN

CameraCenter::CameraCenter()
{
	isSampleViewUsingCamera = true;
}

void CameraCenter::DebugForward()
{
	mCamera->moveRelative(Vector3(0,0,-50));
}

void CameraCenter::DebugBack()
{	
	mCamera->moveRelative(Vector3(0,0,50));
}

void CameraCenter::DebugUp()
{
	mCamera->moveRelative(Vector3(0,50,0));
}

void CameraCenter::DebugDown()
{	
	mCamera->moveRelative(Vector3(0,-50,0));
}

void CameraCenter::DebugLeft()
{
	mCamera->moveRelative(Vector3(-50,0,0));
}

void CameraCenter::DebugRight()
{
	mCamera->moveRelative(Vector3(50,0,0));
}

void CameraCenter::DebugCameraUpdate()
{
	if (isSampleViewUsingCamera)
	{
		mCamera->yaw(mRotX);
		mCamera->pitch(mRotY);
		mCamera->moveRelative(mTranslateVector);
	}
}

void CameraCenter::DebugYaw( int deg )
{
	mCamera->yaw(Degree(deg));
}

void CameraCenter::DebugPitch( int deg )
{
	mCamera->pitch(Degree(deg));
}

_NAMESPACE_END